package com.xxgc.wujiaoservice;

import com.baomidou.mybatisplus.core.toolkit.AES;

public class TestPass {
    public static void main(String[] args) {
        // 生成16位随机AES密钥
        String randomKey = "9876543210123456";
        System.out.println("randomKey = " + randomKey);
        String url="jdbc:mysql://47.109.66.57:3306/zde?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=UTC";
        String name="root";
        String pass="Hq204412@";
        // 使用随机密钥加密数据
        String encryptedUrl= AES.encrypt(url, randomKey);
        String encryptedName= AES.encrypt(name, randomKey);
        String encryptedPass= AES.encrypt(pass, randomKey);

        System.out.println("encryptedUrl = " + encryptedUrl);
        System.out.println("encryptedName = " + encryptedName);
        System.out.println("encryptedPass = " + encryptedPass);
    }
}
